Multifunction hexadecimal instructions

ABSTRACT

A new zSeries floating-point unit has a fused multiply-add dataflow capable of supporting two architectures and fused MULTIPLY and ADD and Multiply and SUBTRACT in both RRF and RXF formats for the fused functions. Both binary and hexadecimal floating-point instructions are supported for a total of 6 formats. The floating-point unit is capable of performing a multiply-add instruction for hexadecimal or binary every cycle with a latency of 5 cycles. This supports two architectures with two internal formats with their own biases. This has eliminated format conversion cycles and has optimized the width of the dataflow. The unit is optimized for both hexadecimal and binary floating-point architecture supporting a multiply-add/subtract per cycle.

FIELD OF THE INVENTION

[0001] This invention relates to computer system architecture and particularly to new instructions which augment the IBM z/Architecture and can be emulated by other architectures and these new fused hexadecimal floating point instructions MULTIPLY AND ADD and MULTIPLY AND SUBTRACT execute in a new floating point unit with RRF and RXF formats.

[0002] Trademarks: IBM® is a registered trademark of International Business Machines Corporation, Armonk, N.Y., U.S.A.. S/390, Z900 and z990 and other product names may be registered trademarks or product names of International Business Machines Corporation or other companies.

BACKGROUND OF THE INVENTION

[0003] Before our invention IBM has created through the work of many highly talented engineers beginning with machines known as the IBM System 360 in the 1960s to the present, a special architecture which, because of its essential nature to a computing system, became known as “the mainframe” whose principles of operation state the architecture of the machine by describing the instructions which may be executed upon the “mainframe” implementation of the instructions which had been invented by IBM inventors and adopted, because of their significant contribution to improving the state of the computing machine represented by “the mainframe”, as significant contributions by inclusion in IBM's Principles of Operation as stated over the years. The First Edition of the z/Architecture Principles of Operation which was published December, 2000 has become the standard published reference as SA22-7832-00. The first machine to implement both binary floating point BFP and hexadecimal floating point HFP architectures in hardware providing a floating point unit was the 1998 IBM S/390 G5 Processor.

[0004] A hexadecimal dataflow is used which requires binary operands to be converted to hexadecimal operands before they are operated on. The HFP instructions are capable of performing one add or one multiply per cycle with a latency of about 3 cycles. The BFP instructions can only be pipelined one instruction every other cycle and the latency is 5 or 6 cycles due to the extra conversion cycles and rounding cycle.

[0005] We determined that further new hexadecimal floating point instructions would assist the art and could be included in a z/Architecture machine and also emulated by others in simpler machines, as described herein. Improvements have been made to the Floating Point Unit itself.

BRIEF SUMMARY OF THE INVENTION

[0006] The next generation zSeries floating-point unit will include the preferred embodiments of our new fused hexadecimal floating point instructions MULTIPLY AND ADD and MULTIPLY AND SUBTRACT execute in the floating point unit with RRF and RXF formats. The improved floating point unit can be used with the HFP instructions described herein and so the system described herein is the first IBM mainframe with a fused multiply-add dataflow. It supports both S/390 hexadecimal floating-point architecture and the IEEE 754 binary floating-point architecture which was first implemented in S/390 on the 1998 S/390 G5 floating-point unit. The new floating-point unit supports a total of 6 formats including single, double, and quadword formats implemented in hardware. With the fused multiply-add dataflow the third operand is multiplied by the second operand, and then the first operand is added to or subtracted from the product. The ADD sum or SUBTRACT difference is placed at the first-operand location. The MULTIPLY AND ADD and MULTIPLY AND SUBTRACT operations may be summarized as:

op1=op3.op2±op1

[0007] The third and second HFP operands are multiplied, forming an intermediate product, and the first operand is then added (or subtracted) algebraically to (or from) the intermediate product, forming an intermediate result. The exponent and fraction of the intermediate product and intermediate result are maintained exactly. The intermediate result, if non zero, is normalized and truncated to the operand format and then placed at the first-operand location.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWING

[0008] These and other objects will be apparent to one skilled in the art from the following detailed description of the invention taken in conjunction with the accompanying drawings in which:

[0009]FIG. 1 is a diagram of the Multiply and Add instruction in the RRF instruction format;

[0010]FIG. 2 is a diagram of the Multiply and Add instruction in the RXF instruction format;

[0011]FIG. 3 is a diagram of the Multiply and Subtract instruction in the RRF instruction format; and

[0012]FIG. 4 is a diagram of the Multiply and Subtract instruction in the RXF format.

[0013]FIG. 5. Shows the main fraction dataflow of the Floating Point Unit (FPU) utilizing the Multiply and Add and Multiple and Subtract instructions in the RRF and RXF formats.

[0014]FIG. 6 shows the folded form layout of the FPU.

[0015]FIG. 7 illustrates a computer enabling emulation of the Multiply and Add and Multiply and Subtract instructions.

DETAILED DESCRIPTION OF THE INVENTION

[0016] For an overview, we will describe a new zSeries floating-point unit has been shown which, for the first time, is based on a fused multiply-add dataflow capable of supporting two architectures and fused MULTIPLY and ADD and Multiply and SUBTRACT in both RRF and RXF formats for the fused functions. Both binary and hexadecimal floating-point instructions are supported for a total of 6 formats. The floating-point unit is capable of performing a multiply-add instruction for hexadecimal or binary every cycle with a latency of 5 cycles. This has been accomplished by a unique method of representing the two architectures with two internal formats with their own biases. This has eliminated format conversion cycles and has optimized the width of the dataflow. Though, this method creates complications in the alignment of the addend and product which have been shown in detail. Denormalized numbers are almost exclusively handled in hardware except for one case which is destined for an underflow exception handler anyway.

[0017] The new zSeries floating-point unit is optimized for both hexadecimal and binary floating-point architecture. It is versatile supporting 6 formats, and it is fast supporting a multiply-add per cycle.

[0018] In more detail, our new fused hexadecimal floating point instructions MULTIPLY AND ADD and MULTIPLY AND SUBTRACT execute in the floating point unit with RRF and RXF formats as shown in the FIGS. 1, 2, 3 and 4. The improved floating point unit can be used with the HFP instructions described herein and so the system described herein is the first IBM mainframe with a fused multiply-add dataflow. It supports both S/390 hexadecimal floating-point architecture and the IEEE 754 binary floating-point architecture which was first implemented in S/390 on the 1998 S/390 G5 floating-point unit. The new floating-point unit supports a total of 6 formats including single, double, and quadword formats implemented in hardware. With the fused multiply-add dataflow the third operand is multiplied by the second operand, and then the first operand is added to or subtracted from the product. The ADD sum or SUBTRACT difference is placed at the first-operand location. The MULTIPLY AND ADD and MULTIPLY AND SUBTRACT operations may be summarized as:

op1=op3.op2±op1

[0019] Specifically, the new description of MULTIPLY AND ADD is illustrated by FIGS. 1 and 2 supporting op1=op3.op2+op1.

[0020]FIG. 1 is a diagram of the Multiply and Add instruction in the RRF instruction format, and FIG. 2 is a diagram of the Multiply and Add instruction in the RXF instruction format.

[0021] The new description of MULTIPLY AND SUBTRACT is illustrated by FIGS. 3 and 4 supporting op1=op3.op2−op1.

[0022]FIG. 3 is a diagram of the Multiply and Subtract instruction in the RRF instruction format, and FIG. 4 is a diagram of the Multiply and Subtract instruction in the RXF format.

[0023] As we have stated, the third operand is multiplied by the second operand, and then the first operand is added to or subtracted from the product. The sum or difference is placed at the first-operand location. Both the MULTIPLY AND ADD and MULTIPLY AND SUBTRACT operations may be summarized as:

op1=op3.op2±op1

[0024] The third and second HFP operands are multiplied, forming an intermediate product, and the first operand is then added (or subtracted) algebraically to (or from) the intermediate product, forming an intermediate result. The exponent and fraction of the intermediate product and intermediate result are maintained exactly. The intermediate result, if non zero, is normalized and truncated to the operand format and then placed at the first-operand location.

[0025] The sign of the result is determined by the rules of algebra, unless the intermediate-result fraction is zero, in which case the result is made a positive true zero.

[0026] An HFP-exponent-overflow exception exists when the characteristic of the normalized result would exceed 127 and the fraction is not zero. The operation is completed by making the result characteristic 128 less than the correct value, and a program interruption for HFP exponent overflow occurs. The result is normalized, and the sign and fraction remain correct.

[0027] HFP exponent overflow is not recognized on intermediate values, provided the normalized result can be represented with the correct characteristic. An HFP-exponent-underflow exception exists when the characteristic of the normalized result would be less than zero and the fraction is not zero. If the HFP-exponent-underflow mask bit in the PSW is one, the operation is completed by making the result characteristic 128 greater than the correct value, and a program interruption for HFP exponent underflow occurs. The result is normalized, and the sign and fraction remain correct. If the HFP-exponent-underflow mask bit in the PSW is zero, a program interruption does not occur; instead, the operation is completed by making the result a positive true zero.

[0028] HFP exponent underflow is not recognized on input operands and intermediate values, provided the normalized result can be represented with the correct characteristic.

[0029] Condition Code: The code remains unchanged.

[0030] Program Exceptions:

[0031] Access (fetch, operand 2 of MAE, MAD, MSE, MSD)

[0032] Data with DXC 1, AFP register

[0033] HFP exponent overflow

[0034] HFP exponent underflow

[0035] Operation (if the HFP multiply-add/subtract facility is not installed)

[0036] Programmers should note that fused HFP MULTIPLY AND ADD (SUBTRACT) differs from MULTIPLY followed by ADD (SUBTRACT) NORMALIZED in the following ways:

[0037] 1. The product is maintained to full precision, and overflow and underflow are not recognized on the product.

[0038] 2. The HFP-significance exception is not recognized for MULTIPLY AND ADD (SUBTRACT).

[0039] 3. ADD (SUBTRACT) NORMALIZED maintains only a single guard digit and does not prenormalize input operands; thus, in some cases, an unnormalized input operand may cause loss of precision in the result. MULTIPLY AND ADD (SUBTRACT) maintains the entire intermediate sum (difference), which is normalized before the truncation operation is performed; thus, unnormalized operands do not cause any additional loss of precision.

[0040] 4. On most models of our planned machines tested with the floating point unit described below, the execution time of MULTIPLY AND ADD (SUBTRACT) is less than the combined execution time of MULTIPLY followed by ADD (SUBTRACT) NORMALIZED. The performance of MULTIPLY AND ADD (SUBTRACT) may be severely degraded in the case of unnormalized input operands.

[0041] The new floating-point unit whose dataflow is illustrated by FIG. 5 supports a total of 6 formats including single, double, and quadword formats implemented in hardware. The floating-point pipeline is 5 cycles with a throughput of 1 multiply-add per cycle. Both hexadecimal and binary floating-point instructions are capable of this performance due to a novel way of handling both formats. Other key developments include new methods for handling denormalized numbers and quad precision divide engine dataflow.

[0042] Introduction to the Floating-point Unit (FPU)

[0043] This future floating-point unit (FPU) of a high performance microprocessor which is optimized for commercial workloads. (n.b. For convenience of reference we have bracketed the footnotes which appear at the end of this description adjacent the relevant reference point.) The FPU implements two architectures: Binary Floating-Point (BFP) which is compliant with the IEEE 754 Standard [1], and Hexadecimal Floating-Point (HFP) as specified by IBM S/390 Architecture [2] which is now called z/Architecture [3]. There are a total of 6 formats supported which include single, double, and quadword formats for the two architectures as shown in the following table: Format bits sign exponent significand bias BFP short 32 1 8 24 127 BFP long 64 1 11 53 1023 BFP quad 128 1 15 113 16383 HFP short 32 1 7 24 64 HFP long 64 1 7 56 64 HFP quad 128 1 7 112 64

[0044] Unlike many other processors, zSeries processors implement quad precision operations in hardware, and this includes support for both HFP and BFP architectures.

[0045] Prior IBM zSeries floating-point units which can be designated by the year and Generation (e.g. 1996 G4) have included the 1996 G3 FPU [4], the 1997 G4 FPU [5, 6], the 1998 G5 FPU [7, 8], the 1999 G6 FPU and the 2000 z900 FPU [9]. Most are remaps of the G5 FPU with extensions for 64-bit integers. The G4 FPU has an aggressive cycle time and can complete a multiply or add in about 3 cycles with a throughput of 1 per cycle. The G5 FPU is the first FPU to implement both BFP and HFP architectures in hardware on one pipeline. The G5 FPU design is based on the G4 FPU so it has the same latency for HFP instructions.

[0046] BFP instructions involve translating the operands to HFP format, performing the arithmetic operation including rounding and then converting back to BFP format. So, BFP operations take 5 or 6 cycles of latency with a throughput of only one BFP instruction every two cycles.

[0047] The prior IBM G5 FPU was designed with only one year between its announcement and that of the G4 FPU. So, the BFP arithmetic implementation is not optimized for speed, but instead for simplicity. With a longer development schedule for the next zSeries FPU, there were a few new goals: 1) optimize for BFP, 2) optimize for multiply-add, and then 3) optimize for HFP. The first goal was chosen due to the increase of new workloads on zSeries, particularly workloads utilizing Linux. These applications are typically written in Java or C++ and, especially those written in Java, rely on BFP even in commercial applications.

[0048] Thus, the primary goal was to create a high performance implementation much like the pSeries workstations.

[0049] One key element of pSeries floating-point units is that the dataflow supports our fused multiply-add described above which effectively yields two operations per cycle. Since this type of design is optimal for BFP architectures, a decision was made to base our design on the IBM Power4 design used in the commercial workstation of IBM.

[0050] The Power4 floating-point unit has a 6 stage binary multiply-add dataflow. It uses tags in the register file to identify denormalized data. It has only 2 data formats, BFP single and double with double format retained in the register file. The major enhancements of our new zSeries FPU to the Power4 design are:

[0051] 1. Two architectures are supported (HFP and BFP) which results in 6 formats versus only 2 formats of BFP, and 200 different instructions are implemented directly in hardware.

[0052] 2. The pipeline is reduced to 5 cycles.

[0053] 3. Denormalized number handling is supported without tags or prenormalization.

[0054] 4. The normalizer and LZA are expanded to full width.

[0055] 5. Division and square root are implemented with a quad precision radix-4 SRT algorithm.

[0056] These items will be detailed hereinbelow. First, implementing two architectures in one dataflow will be discussed. Then, the overall dataflow will be described

[0057] Dual Architectures

[0058] The first machine to implement both BFP and HFP architectures in hardware is the 1998 IBM S/390 G5 Processor [7]. A hexadecimal dataflow is used which requires binary operands to be converted to hexadecimal operands before they are operated on. The HFP instructions are capable of performing one add or one multiply per cycle with a latency of about 3 cycles. The BFP instructions can only be pipelined one instruction every other cycle and the latency is 5 or 6 cycles due to the extra conversion cycles and rounding cycle.

[0059] The problem with optimizing the dataflow for both HFP and BFP architectures centers on the choice of an internal bias. HFP architecture has a bias of the form 2n−1 whereas BFP has a bias of the form (2n−1−1). To choose one of the biases as the internal bias and to convert to the other format requires shifting the significands and adding constants to the exponent. To avoid a conversion cycle, a separate internal representation and bias was chosen for both architectures as shown by the following:

XBF Pi=(−1)Xs*(1+Xf)*2**(e-biasBi)

biasBi=2**(n−1)−1=32767

XHF Pi=(−1)Xs*Xf*2**(e-biasHi)

biasHi=2**(n−1)=32768

[0060] This results in no conversion cycles and the dataflow is optimized for both architectures. This requires two different shift amount calculations since the biases differ and the implied radix points differ, but this is a very small amount of hardware.

[0061] Floating Point Dataflow Overview

[0062]FIG. 5 shows the fraction dataflow. At the top of the figure there is the Floating-Point Register file (FPR) with 16 registers of 64 bits each. There are also 5 wrap registers to hold data for loads.

[0063]FIG. 5. shows Main Fraction Dataflow of FPU. Loads are staged through the 5 wrap registers and the dataflow. Loads can be bypassed from any stage in the pipeline to a dependent instruction by using the wrap registers. This eliminates wiring congestion in the FPU dataflow stack and instead localizes it to the register file. When a read of an operand occurs, the data can come from the architected register file, the wrap registers, or a wrap back path from the dataflow, or from memory. In one cycle three registers of 64 bits can be read and one register can be written.

[0064] The dataflow is a three operand dataflow, which has a fused multiply and add data structure. One multiplier operand and the addend always come from the FPRs, while the 2nd operand may come from memory. In the starting cycle (labeled E0), the A,B and C registers are loaded with the correct formatting applied, such as zeroing the low order bits of a short precision operand. For binary formats the ‘implied one’ bit is assumed to be always ‘1’. If a denormalized number is detected afterwards, this is corrected in the multiplier and/or the aligner logic.

[0065] In the first execution cycle (E1), the shift amount for the alignment is calculated (considering potential de-normalized operand cases). Also, the multiplication is started with Booth encoding and the first 4 stages of 3:2 counters of the Wallace tree. If there is an effective subtraction, the addend is stored inverted in the C2 register.

[0066] In the second execution cycle (E2), the alignment uses the previous calculated shift amount. In the multiplier, the next 4 stages of 3:2 counters reduce the tree to two partial products. These partial products with the aligned addend go through the last 3:2 counter to build the ‘sum’ and ‘carry’ of the multiply and add result. To balance the paths for the timing, the propagate and generate logic is performed also in this cycle. The propagate and generate bits are stored in a register instead of the sum and carry bits. A potential high part of the aligner output is stored in the high-sum register (HIS reg).

[0067] In the third execution cycle (E3), the main addition takes place. There is a ‘True’ and a ‘Complement’ Adder to avoid an extra cycle for recomplementation. Essentially, both A-B and B-A are calculated and the result is selected based on the carry output of the true adder. The number of leading zero bits is calculated using a zero digit count (ZDC) as described in [4]. This algorithm performs a zero digit count on 16 bit block basis of SUM and SUM+1. When the carries are known the result is selected among the digits. The aligner bits which did not participate in the add are called the high-sum and they feed an incrementer in this cycle. At the end of this cycle there is a multiplexor which chooses between high-sum and high-sum plus one and also chooses whether to shift the result by 60 bits. If the high-sum is non-zero, the high-sum and upper 56 bits of the adder output are chosen to be latched. If instead the high-sum is zero, only the bits of the adder output are latched. Also the leading zero count is stored in the LZC register.

[0068] In the fourth execution cycle (E4), the normalization is done. The stored leading zero count is used directly to do the normalization. No correction is necessary, since the LZC is precise. For hex formats, only the two low order bits of the leading zero count are not used to get the normalized hex result. Additionally, the sticky bits are built according to the format.

[0069] In the fifth execution cycle (E5), the rounding and reformatting is done. For hex operands no rounding is needed, but the operands will pass this cycle anyway. Since there is a feedback path from the normalizer to the A, B, and C registers,

[0070] Physical Implementation

[0071] The fraction dataflow has been implemented in a bit stack approach in the folded form layout of FIG. 6. The A,B and C registers have a width of 56 bits. This is widened during alignment and multiplication. The adder, normalizer, and rounder are 116 bits wide. The output of the rounder is reformatted to a width of 64 (with exponent). The layout has a folded form.

[0072] On the top of FIG. 6 are the architectural floating-point registers with A, B, and C registers below. On the bottom is the normalizer. The exponent dataflow is in a stack on the right of the A, B, and C fraction registers.

[0073] The divider is also implemented in a stack approach, whereby the divide-table is combinatorial logic which occupies a very small area on the left hand side of the divider macro. Since the interconnection of the divide engine to the main fraction dataflow is not timing critical, this can be located away from the main dataflow and is shown in the right upper corner of the layout. The fraction dataflow is on the left hand side. On the right are the synthesized control logic macros. For each execution pipeline there is one separate control macro. The macros on the bottom contain some miscellaneous logic, which is not related to the floating-point function.

[0074] The divider macro is completely designed in standard inverting CMOS logic. Although it has been implemented as a full custom macro, extensive use of a standard cell library has been made in order to keep layout effort small.

[0075] As a power saving feature, most parts of the floating-point unit can be turned off completely when not in use. For enhanced testability, each of the master-slave latches is accompanied by an additional scan latch. Adding this extra scan latch to the scan chain configuration results in an increased transition fault coverage. The floating-point unit occupies an area of 3.76 mm2. The divider macro occupies 0.22 mm2, which is about 6% of the FPU. It has been fabricated in IBM's 0.13 micron CMOS SOI technology. At a supply voltage of 1.15V and a temperature of 50° C. it supports a clock frequency significantly greater than 1 Ghz.

[0076] Emulation Execution

[0077] The machine which we prefer to use with our floating point unit is the z/Architecture computer system having a FXU unit as described in copending application “Superscalar Microprocessor having Multi-pipe Dispatch and Execution Unit” Ser. No. ______, filed concurrently herewith by Timothy Slegel et al. The long displacement facility format of instructions are executed in the FXU of that computer system. In FIG. 7 we have shown conceptually how to implement what we have in a preferred embodiment implemented in a mainframe computer having the microprocessor described above which can effectively be used, as we have experimentally proven within IBM, in a commercial implementation of the long displacement facility computer architected instruction format the instructions are used by programmers, usually today “C” programmers. These instruction formats stored in the storage medium may be executed natively in a Z/Architecture IBM Server, or alternatively in machines executing other architectures. They can be emulated in the existing and in future IBM mainframe servers and on other machines of IBM (e.g. pSeries Servers and xSeries Servers). They can be executed in machines running Linux on a wide variety of machines using hardware manufactured by IBM, Intel, AMD, Sun Microsystems and others. Besides execution on that hardware under a Z/Architecture, Linux can be used as well as machines which use emulation by Hercules, UMX, FXI or Platform Solutions, where generally execution is in an emulation mode. In emulation mode the specific instruction being emulated is decoded, and a subroutine built to implement the individual instruction, as in a “C” subroutine or driver, or some other method of providing a driver for the specific hardware as is within the skill of those in the art after understanding the description of the preferred embodiment. Various software and hardware emulation patents including, but not limited to U.S. Pat. No. 5,551,013 for a “Multiprocessor for hardware emulation” of Beausoleil et al., and U.S. Pat. No. 6,009,261: Preprocessing of stored target routines for emulating incompatible instructions on a target processor” of Scalzi et al; and U.S. Pat. No. 5,574,873: Decoding guest instruction to directly access emulation routines that emulate the guest instructions, of Davidian et al; U.S. Pat. No. 6,308,255: Symmetrical multiprocessing bus and chipset used for coprocessor support allowing non-native code to run in a system, of Gorishek et al; and U.S. Pat. No. 6,463,582: Dynamic optimizing object code translator for architecture emulation and dynamic optimizing object code translation method of Lethin et al; and U.S. Pat. No. 5,790,825: Method for emulating guest instructions on a host computer through dynamic recompilation of host instructions of Eric Traut; and many others, illustrate the a variety of known ways to achieve emulation of an instruction format architected for a different machine for a target machine available to those skilled in the art, as well as those commercial software techniques used by those referenced above.

[0078] In the preferred embodiment the existing pre-long displacement instruction formats for a non superscalar instruction form the operand storage address by the summing of the base register and 12 bit unsigned displacement or the base register, the index register, and the 12 bit unsigned displacement and the new long displacment instruction formats form the operand storage address by the summing of the base register and the 20 bit signed displacement or the base register, the index register, and the 20 bit signed displacement.

[0079] As illustrated by FIG. 7, these instructions are executed in hardware by a processor or by emulation of said instruction set by software executing on a computer having a different native instruction set.

[0080] In FIG. 7, #501 shows a computer memory storage containing instructions and data. The long displacement instructions described in this embodiment would initially stored in this computer. #502 shows a mechanism for fetching instructions from a computer memory and may also contain local buffering of these instructions it has fetched. Then the raw instructions are transferred to an instruction decoder, #503, where it determines what type of instruction has been fetched. #504, shows a mechanism for executing instructions. This may include loading data into a register from memory, #501, storing data back to memory from a register, or performing some type of arithmetic or logical operation. This exact type of operation to be performed has been previously determined by the instruction decoder. The long displacement instructions described in this embodiment would be executed here. If the long displacement instructions are being executed natively on a computer system, then this diagram is complete as described above. However, if an instruction set architecture, containing long displacement instructions, is being emulated on another computer, the above process would be implemented in software on a host computer, #505. In this case, the above stated mechanisms would typically be implemented as one or more software subroutines within the emulator software. In both cases an instruction is fetched, decoded and executed.

[0081] More particularly, these architected instructions can be used with a computer architecture with existing instruction formats with a 12 bit unsigned displacement used to form the operand storage address and also one having additional instruction formats that provide a additional displacement bits, preferably 20 bits, which comprise an extended signed displacement used to form the operand storage address. These computer architected instructions comprise computer software, stored in a computer storage medium, for producing the code running of the processor utilizing the computer software, and comprising the instruction code for use by a compiler or emulator/interpreter which is stored in a computer storage medium 501, and wherein the first part of the instruction code comprises an operation code which specified the operation to be performed and a second part which designates the operands for that participate. The long displacement instructions permit additional addresses to be directly addressed with the use of the long displacement facility instruction.

[0082] As illustrated by FIG. 7, these instructions are executed in hardware by a processor or by emulation of said instruction set by software executing on a computer having a different native instruction set.

[0083] In accordance with the computer architecture of the preferred embodiment the displacement field is defined as being in two parts, the least significant part being 12 bits called the DL, DL1 for operand 1 or DL2 for operand 2, and the most-significant part being 8 bits called the DH, DH1 for operand 1 or DH2 for operand 2.

[0084] Furthermore, the preferred computer architecture has an instruction format such that the opcode is in bit positions 0 through 7 and 40 through 47, a target register called R1 in bit positions 8 through 11, an index register called X2 in bit positions 12 through 15, a base register called B2 in bit positions 16 through 19, a displacement composed of two parts with the first part called DL2 in bit positions 20 through 31 and the second part called DH2 in bit positions 32 through 39.

[0085] This computer architecture has an instruction format such that the opcode is in bit positions 0 through 7 and 40 through 47, a target register called R1 in bit positions 8 through 11, an source register called R3 in bit positions 12 through 15, a base register called B2 in bit positions 16 through 19, a displacement composed of two parts with the first part called DL2 in bit positions 20 through 31 and the second part called DH2 in bit positions 32 through 39.

[0086] Furthermore, our computer architecture instructions having a long displacement facility has an instruction format such that the opcode is in bit positions 0 through 7 and 40 through 47, a target register called R1 in bit positions 8 through 11, a mask value called M3 in bit positions 12 through 15, a base register called B2 in bit positions 16 through 19, a displacement composed of two parts with the first part called DL2 in bit positions 20 through 31 and the second part called DH2 in bit positions 32 through 39.

[0087] As illustrated, our preferred computer architecture with its long displacement facility has an instruction format such that the opcode is in bit positions 0 through 7 and 40 through 47, an immediate value called I2 in bit positions 8 through 15, a base register called B2 in bit positions 16 through 19, a displacement composed of two parts with the first part called DL1 in bit positions 20 through 31 and the second part called DH1 in bit positions 32 through 39.

[0088] Our long displacement facility computer architecture operates effectively when using new instructions which are created that only use the instruction format with the new 20 bit unsigned displacement.

[0089] A specific embodiment of our computer architecture utilizes existing instructions which have the instruction formats that only have the 12 bit unsigned displacement and are now defined to be in the new instruction formats to have either the existing 12 bit unsigned displacement value when the high order 8 bits of the displacement, field DH, are all zero, or a 20 bit signed value when the high order 8 bits of the displacement, field DH, is non-zero.

[0090] While the preferred embodiment of the invention has been illustrated and described herein, it is to be understood that the invention is not limited to the precise construction herein disclosed, and the right is reserved to all changes and modifications coming within the scope of the invention as defined in the appended claims.

Referenced Footnotes

[0091] [1] “IEEE standard for binary floating-point arithmetic, ANSI/IEEE Std 754-1985,” The Institute of Electrical and Electronic Engineers, Inc., New York, August 1985.

[0092] [2] “Enterprise Systems Architecture/390 Principles of Operation,” Order No. SA22-7201-7, available through IBM branch offices, July 2001.

[0093] [3] “z/Architecture Principles of Operation,” Order No. SA22-7832-1, available through IBM branch offices, October 2001.

[0094] [4] G. Gerwig and M. Kroener. “Floating-Point-Unit in standard cell design with 116 bit wide dataflow,” In Proc. of Fourteenth Symp. on Comput. Arith., pages 266-273, Adelaide, Austraila, April 1999.

[0095] [5] E. M. Schwarz, L. Sigal, and T. McPherson. “CMOS floating point unit for the S/390 parallel enterpise server G4,” IBM Journal of Research and Development, 41(4/5):475-488, July/September 1997.

[0096] [6] E. M. Schwarz, B. Averill, and L. Sigal. “A radix-8 CMOS S/390 multiplier,” In Proc. of Thirteenth Symp. on Comput. Arith., pages 2-9, Asilomar, Calif., July 1997.

[0097] [7] E. M. Schwarz and C. A. Krygowski. “The S/390 G5 floating-point unit,” IBM Journal of Research and Development, 43(5/6):707-722, September/November 1999.

[0098] [8] E. Schwarz, R. Smith, and C. Krygowski. “The S/390 G5 floating point unit supporting hex and binary architectures,” In Proc. of Fourteenth Symp. on Comput. Arith., pages 258-265, Adelaide, Austraila, April 1999.

[0099] [9] E. M. Schwarz, M. A. Check, C. Shum, T. Koehler, S. Swaney, J. MacDougall, and C. A. Krygowski. “The microarchitecture of the IBM eServer z900 processor,” IBM Journal of Research and Development, 46(4/5):381-396, July/September 2002.

[0100] [10] C. A. Krygowski and E. M. Schwarz. “Floating-point multiplier for de-normalized inputs,” U.S. Patent Application No. 2002/0124037 A1, page 8, Sep. 5, 2002.

[0101] [11] J. E. Robertson. “A new class of digital division methods,” IEEE Trans. Comput., C-7:218-222, September 1958.

[0102] [12] K. D. Tocher. “Techniques of multiplication and division for automatic binary computers,” Quarterly J. Mech. Appl. Math., 11:364-384, 1958.

[0103] [13] M. Ercegovac and T. Lang. Division and Square Root: digit-recurrence algorithms and implementations, Kluwer, Boston, 1994.

[0104] [14] D. I. Harris, S. F. Obermann, and M. A. Horowitz. “SRT Division Architectures and Implementations,” In Proc. of Thirteenth Symp. on Comput. Arith., pages 18-25, Asilomar, Calif., July 1997. 

What is claimed is:
 1. A computer system instruction, comprising: a fused hexadecimal floating point instruction consisting of MULTIPLY AND ADD which enables execution as op1=op3.op2+op1.
 2. A computer system instruction, comprising: a fused hexadecimal floating point instruction consisting of MULTIPLY AND ADD which enables execution as op1=op3.op2−op1.
 3. A computer system storage medium having a plurality of instructions, including: an instruction consisting of MULTIPLY AND ADD operations and an instruction consisting of MULTIPLY AND SUBTRACT operations which enable execution of op1=op3.op2±op1.
 4. A computer system unit, comprising: A floating-pint unit supporting dual hexadecimal floating point (HFP) and IEEE 754 binary floating point (BFP) architectures and six formats including single, double, and quadword formats and having a fused multiply-add dataflow wherein a third operand is multiplied by a second operand, and then a first operand is added to or subtracted from the product.
 5. The computer system unit according to claim 4 wherein ane ADD sum or SUBTRACT difference is placed at the first-operand location such that instuctions executing a MULTIPLY AND ADD operations and MULTIPLY AND SUBTRACT operations operate as: op1=op3.op2±op1.
 6. The computer system unit according to claim 5 wherein the first operation, second operation and third operands are HFP operands and the third and second HFP operands are multiplied, forming an intermediate product, and the first operand is then added for the MULTIPLY AND ADD operations or subtracted for the MULTIPLY AND SUBTRACT operations algebraically to or from, respectively, the intermediate product, forming an intermediate result.
 7. The computer system unit according to claim 6 wherein any exponent and fraction of the intermediate product and intermediate result are maintained exactly or a result that rounds equivalent thereto.
 8. The computer system unit according to claim 7 wherein the intermediate result, if non zero, is normalized and truncated to the operand format and then placed at the first-operand location.
 9. The computer system unit according to claim 5 wherein said dual architectures are supported (HFP and BFP) with 6 formats.
 10. The computer system unit according to claim 7 wherein the execution pipeline of HFP and BFP instructions is 5 cycles.
 11. A computer system, comprising: a storage medium and computer architected instructions stored in a computer storage medium, for producing the execution of the computer architected instructions by a running of a processor utilizing computer software having architected instructions to be executed, and comprising the instruction code which is stored in a computer storage medium, and wherein the first part of the instruction code comprises an operation code which specified the operation to be performed and a second part which designates the operands for that participate, and were at least some of said instructions provide opcodes for performing hexadecimal floating point and binary floating point operations as MULTIPLY AND ADD operations and an instruction consisting of MULTIPLY AND SUBTRACT operations which enable execution of op1=op3.op2±op1; and a decoder for decoding said instructions and an execution unit for execution said computer architected instructions.
 12. The computer system according to claim 11 wherein said MULTIPLY AND ADD AND MULTIPLY AND SUBTRACT OPERATIONS ARE PERFORMED by execution when a third operand is multiplied by a second operand, and then a first operand is added to or subtracted from the product.
 13. The computer system unit according to claim 12 wherein an ADD sum or SUBTRACT difference is placed at the first-operand location such that instructions executing a MULTIPLY AND ADD operations and MULTIPLY AND SUBTRACT operations operate as: op1=op3.op2±op1.
 14. The computer system unit according to claim 13 wherein the first operation, second operation and third operands are HFP operands and the third and second HFP operands are multiplied, forming an intermediate product, and the first operand is then added for the MULTIPLY AND ADD operations or subtracted for the MULTIPLY AND SUBTRACT operations algebraically to or from, respectively, the intermediate product, forming an intermediate result.
 15. The computer system unit according to claim 14 wherein any exponent and fraction of the intermediate product and intermediate result are maintained exactly or a result that rounds equivalent thereto.
 16. The computer system unit according to claim 15 wherein the intermediate result, if non zero, is normalized and truncated to the operand format and then placed at the first-operand location.
 17. The computer system unit according to claim 11 wherein said dual architectures are supported (HFP and BFP).
 18. The computer system unit according to claim 17 wherein the execution pipeline of HFP and BFP instructions with six possible formats is 5 cycles.
 19. The computer system unit according to claim 17 wherein the product is maintained to full precision, and overflow and underflow are not recognized on the product.
 20. The computer system unit according to claim 17 wherein the product is maintained to full precision, and overflow and underflow are not recognized on the product and no HFP-significance exception is recognized for MULTIPLY AND ADD or for MULTIPLY AND SUBTRACT.
 21. The computer system unit according to claim 17 wherein ADD NORMALIZED and SUBTRACT NORMALIZED maintains only a single guard digit and does not prenormalize input operands; thus, in some cases, an unnormalized input operand may cause loss of precision in the result.
 22. The computer system according to claim 20 wherein MULTIPLY AND ADD and MULTIPLY AND SUBTRACT maintains the entire intermediate sum or difference, respectively, which is normalized before the truncation operation is performed.
 23. The computer system according to claim 20 wherein the execution time of MULTIPLY AND ADD and MULTIPLY AND SUBTRACT is less than the combined execution time of MULTIPLY followed by ADD or SUBTRACT, respectively, NORMALIZED.
 24. The computer system according to claim 11 wherein said decoder decodes said computer architected instructions stored in a computer storage medium by emulation.
 25. The computer system instruction according to claim 11 wherein the instructions are executed in hardware by a processor or by emulation of said instruction set by software executing on a computer having a different native instruction set.
 26. The computer system instruction according to claim 1 wherein said instructions are stored in a computer storage medium and are decoded by emulation.
 27. The computer system instruction according to claim 1 wherein the instructions are executed in hardware by a processor or by emulation of said instruction set by software executing on a computer having a different native instruction set.
 28. The computer system instruction according to claim 2 wherein said instructions are stored in a computer storage medium and are decoded by emulation.
 29. The computer system instruction according to claim 2 wherein the instructions are executed in hardware by a processor or by emulation of said instruction set by software executing on a computer having a different native instruction set.
 30. The computer system storage medium according to claim 3 wherein said instructions are stored in a computer storage medium and are decoded by emulation.
 31. The computer system storage according to claim 3 wherein the instructions are executed in hardware by a processor or by emulation of said instruction set by software executing on a computer having a different native instruction set.
 32. The computer system unit according to claim 4 wherein said instructions are stored in a computer storage medium and are decoded by emulation.
 33. The computer system unit according to claim 4 wherein the instructions are executed in hardware by a processor or by emulation of said instruction set by software executing on a computer having a different native instruction set. 